import request from '@/utils/request'

// 查询有案号的客户统计列表
export function listStatisticCases(query) {
  return request({
    url: '/system/statistic/list',
    method: 'get',
    params: query
  })
}

// 导出有案号的客户统计
export function exportStatisticCases(query) {
  return request({
    url: '/system/statistic/export',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

// 同步数据到统计表
export function syncStatisticData() {
  return request({
    url: '/system/statistic/sync',
    method: 'post'
  })
}

// 获取数据详情
export function getStatisticDetail(id) {
  return request({
    url: `/system/statistic/${id}`,
    method: 'get'
  })
} 